<!--
 * @Author: your name
 * @Date: 2021-08-19 15:06:24
 * @LastEditTime: 2021-08-19 15:50:01
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \练习\18-huxideng.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>呼吸灯</title>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        div {
        box-sizing: border-box;
        }

        .content {
        width: 400px;
        height: 600px;
        /* background-color: antiquewhite; */
        margin: 0 auto;
        }

        .content>.box {
        /* border: 1px solid tomato; */
        height: 400px;
        padding: 40px;
        /* 指定应用的一系列动画 属性值是一个由@ keyframes 定义的动画序列*/
        animation-name: outer;
        /* 指定一个动画周期的时长 单位支持s ms 无单位值无效 */
        animation-duration: 5s;
        /* 定义CSS动画在每一动画周期中执行的节奏。 */
        animation-timing-function: linear;
        /* 定义动画在结束前运行的次数 infinite代表无限循环  number默认是1 可以用小数 */
        animation-iteration-count: infinite;
        }

        .content>.box>.outer {
        border: 5px solid gold;
        height: 100%;
        padding: 20px;
        animation-name: inner;
        animation-duration: 5s;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
        }

        .content>.box>.outer>.inner {
        border: 5px solid yellowgreen;
        height: 100%;
        }

        .content>.box>.circle,
        .content>.box>.outer>.circle {
        border-radius: 50%;
        }

        @keyframes outer {
        25% {
            padding: 30px;
        }

        50% {
            padding: 40px;
        }
        }

        @keyframes inner {
        25% {
            padding: 30px;
        }

        50% {
            padding: 20px;
        }

        75% {
            padding: 30px;
        }

        100% {
            padding: 20px;
        }
        }
    </style>
</head>
<body>
    <div class="content">
        <div class="box">
            <div class="outer circle"></div>
            <div class="inner circle"></div>
        </div>
    </div>
</body>
</html>